<div ng-include="'html/component/nav.html'" ng-controller="NavCtrl"></div>
<ul class="set_item" ng-include="'html/component/left_nav.html'" ng-controller="OrderNavCtrl"></ul>

<style>
    .list_animate{
        -webkit-transition: all 0.2s;
        transition: all 0.2s;
        position: relative; left:0px;
    }
    .list_animate.ng-hide{left:-1000px;}
    .set_cont.list_page .list_table th{width:auto;}
    .set_cont.list_page .list_table td{ width:auto;}
    .set_cont.list_page .list_table .list_unit td:first-child{ color:#666; text-decoration:none;}
    .set_cont.list_page .list_table .list_unit td:nth-child(2){ color:#027676; text-decoration:underline;}
    .set_cont.list_page .list_table .list_unit td:nth-child(2) a{ color:#027676; text-decoration:underline; cursor:pointer;}
</style>

<div class="set_box">
    <h1 class="set_title"><!--小票-->{{language.TIPS_RECEIPT}}
        <span class="title_btn_group">
            <a ng-show="buttonHigh == 1" class="title_btn" href="javascript:void(0);" ng-click="set();" ><!--退单申请-->{{language.TIP_ORDER_RECEIPT_CHECK_PENDING_TITLE}}</a>
			 <a ng-show="buttonClose == 1" class="title_btn" href="javascript:void(0);" ng-click="close_detail();" ><!--关闭-->{{language.TIPS_RECEIPT_CLOSE}}</a>
            <a ng-show="buttonRefresh == 1" class="title_btn" href="javascript:void(0);" ng-click="refresh_data();" ><!--刷新-->{{language.TIPS_RECEIPT_REFRESH}}</a>
        </span>
    </h1>
	
    <div class="set_cont list_page list_animate" ng-show="buttonRefresh == 1">
        <table class="list_table">
            <thead>
                <tr>
                    <th><!--时间-->{{language.TIPS_RECEIPT_TIME}}</th>
                    <th><!--单据编号-->{{language.TIPS_RECEIPT_DOC_SEQ}}</th>
                    <th><!--金额-->{{language.TIPS_RECEIPT_MONEY}}</th>
                    <th><!--状态-->{{language.TIPS_RECEIPT_STATUS}}</th>
				</tr>
            </thead>
            <tbody ng-repeat="i in xiaopiao_list| orderBy:'key':true" >
                <tr ng-show="buttonMore == 1" class="date_num">
                    <td class="date" colspan="5"><!--日期-->{{language.TIPS_RECEIPT_DATE}}：{{i.key}}</td>
                    <td class="num">
                        <span>{{i.value.length}}</span>
                    </td>
                </tr>
                <tr class="list_unit" ng-repeat="li in i.value track by $index"  >
                    <td>{{li.create_time | split_filter:" ":1}}</td>
                    <td ng-click="show_detail(li);"><a href="javascript:void(0);">{{li.record_code}}<a/></td>              
                    <td>{{li.money|number:2}}</td>
                    <td>{{li.status|check_pending}}</td>
                </tr>
            </tbody>
        </table>
        <div class="btn_more"><!--更多--><button class="btn" ng-click='scoll.nextpage();' ng-show="buttonMore == 1"></button></div>
    </div>

    <div class="set_cont detail_page" ng-show="buttonRefresh == 0" ng-swipe-right="close_detail();" >
        <form class="detail_form">
            <p class="title">
                <!--单号-->{{language.TIPS_RECEIPT_DOC_SEQ}}：{{xiaopiao.record_code}} 
            </p>	
            <table class="detail_table">
                <tr>
                    <td class="name"><!--日期-->{{language.TIPS_RECEIPT_TIME}}：</td>
                    <td class="val">{{xiaopiao.create_time | split_filter:" ":1}}</td>
					<td class="name"><!--总价-->{{language.TIPS_RECEIPT_MONEY}}：</td>
                    <td class="val">{{xiaopiao.money|number:2}}</td>
                </tr>
                <tr>
                    <td class="name"><!--状态-->{{language.TIPS_RECEIPT_STATUS}}：</td>
                    <td class="val">{{xiaopiao.status|check_pending}}</td>
                </tr>
                <tr>
                    <td class="name"><!--整单备注-->{{language.TIPS_ALL_REMARK}}:</td>
                    <td colspan="3">{{xiaopiao.description}}</td>
                </tr>  
            </table>
        </form>
    </div>    
</div>